import java.util.Scanner;
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int i = 1;
        int count = 0;
        int n = scanner.nextInt();
        String y = scanner.next();
        while(n-2*(i+2)> 0){
            i = i+2;
            n = n-2*i;
            count++;
        }
        int k = count*2+1;
        for (int j = k; j>= 1; j-=2) {
            for (int l = 0; l < (k-j)/2; l++) {
                System.out.print(" ");
            }
            for (int l = 0; l < j; l++) {
                System.out.print(y);
            }
           /* for (int l = 0; l < k-j; l++) {
                System.out.print(" ");
            }*/
            System.out.println();
        }
        for (int j = 3; j <= k ; j+=2) {
            for (int l = 0; l < (k-j)/2; l++) {
                System.out.print(" ");
            }
            for (int l = 1; l <= j; l++) {
                System.out.print(y);
            }
            System.out.println();
        }
        System.out.println(n-1);
    }
}
